<div class="panel panel-default">
	<div class="panel-heading">密码管理</div>
	<div class="panel-body">
		<form class="form-horizontal" role="form" #valForm="ngForm">
			<div class="form-group" *ngIf="!changeAccount && user.firstLogin">
				<label for="" class="col-lg-2 control-label"></label>
			    <label for="file1" class="col-lg-3 control-label file-upload">
                    <button class="btn btn-info btn-block btn-outline" (click)="changeAccount = true;">
       					<span class="fa icon-cloud-upload mr"></span>            
                   		修改用户名
                   	</button>
                </label>
			</div>        
			<div class="form-group" *ngIf="changeAccount && user.hasRole(5) && user.firstLogin">
				<label for="newAccount" class="col-lg-2 control-label">用户名：</label>
				<div class="col-lg-3">
					<input class="form-control" type="text" [(ngModel)]="newAccount"
						required name="newAccount" placeholder="请输入用户名"/>
				</div>
				<label for="" class="col-lg-2 control-label"></label>
				<div class="col-lg-3">
				</div>
			</div>		
			<div class="form-group">
				<label for="oldPassword" class="col-lg-2 control-label">旧密码：</label>
				<div class="col-lg-3">
					<input class="form-control" type="password" [(ngModel)]="oldPassword"
						required name="oldPassword" placeholder="请输入原密码"/>
				</div>
				<label for="" class="col-lg-2 control-label"></label>
				<div class="col-lg-3">
				</div>
			</div>
			<div class="form-group">
				<label for="newPassword" class="col-lg-2 control-label">新密码：</label>
				<div class="col-lg-3">
					<input class="form-control" type="password" [(ngModel)]="newPassword" #newPasswordModel="ngModel"
						required name="newPassword" placeholder="请输入新密码"/>
				</div>
				<label for="reNewPassword" class="col-lg-2 control-label">再输入一次新密码：</label>
				<div class="col-lg-3">
					<input class="form-control" type="password" [(ngModel)]="reNewPassword"  [equalTo]="newPasswordModel"
						required name="reNewPassword" placeholder="请再输入新密码"/>			
				</div>
			</div>
            <div class="form-group">
            	<label for="" class="col-lg-2 control-label"></label>
            	<div class="col-lg-2">
            		<button class="mb-sm btn btn-primary btn-outline" type="button" [disabled]="!valForm.valid" (click)="submit()">确定</button>
            	</div>
            	<div class="col-lg-1">
            		<button class="mb-sm btn btn-primary btn-outline" type="button" (click)="cancel()">取消</button>
            	</div>
            </div>			
		</form>		
	</div>
</div>